﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Whir_System_Login" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>平桥镇中小企业生产力促进中心 - 管理系统</title>
    <link href="Skin/Default/Css/css.css" rel="stylesheet" type="text/css" />
    <link href="Skin/Default/Css/softkey.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="Js/JKeyword/keyboard.js" charset="UTF-8"></script>
    <script type="text/javascript" src="Js/sha1.js" charset="UTF-8"></script>
    <link rel="stylesheet" type="text/css" href="Js/JKeyword/keyboard.css">

    <script language="javascript">
    if (top.location != self.location)
        top.location=self.location;
        
        
     function sha1Pass(){
        var pwd = document.getElementById("txt2");        
        pwd.value = calcSHA1(pwd.value);
        return true;
     }
    </script>

</head>
<body>
    <form id="form1" runat="server" onsubmit="return sha1Pass();">
        <table width="1002" height="145" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
                <td>&nbsp;</td>
            </tr>
        </table>
        <table width="1002" height="274" border="0" align="center" cellpadding="0" cellspacing="0"
            background="Skin/Default/images/lo_bg.jpg">
            <tr>
                <td height="134">
                    <table width="592" height="276" border="0" align="center" cellpadding="0" cellspacing="0">
                        <tr>
                            <td valign="top">
                                <table width="592" border="0" cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td width="279">
                                            <asp:Literal ID="litImg" runat="server"></asp:Literal>
                                            <img src="Skin/Default/Images/left.jpg" width="289" height="216" /></td>
                                        <td width="303" height="216" align="center" valign="bottom" background="Skin/Default/images/right.jpg">
                                            <table width="299" height="82" border="0" cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td width="56" height="30" align="right" class="font_l">用户名：</td>
                                                    <td width="153" height="30" align="left">
                                                        <asp:TextBox ID="txt1" runat="server" Width="130" TabIndex="1" Style="ime-mode: disabled;"
                                                            CssClass="input_text"></asp:TextBox>
                                                    </td>
                                                    <td width="70" rowspan="4" valign="top">
                                                        <asp:ImageButton ID="ibnLogin" runat="server" ImageUrl="Skin/Default/images/dl.jpg"
                                                            OnClientClick="return checkForm();" OnClick="ibnLogin_Click" TabIndex="4" Style="margin-top: 5px;" />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td height="30" align="right" class="font_l">密&nbsp;&nbsp;码：</td>
                                                    <td height="30" align="left">
                                                        <asp:TextBox ID="txt2" runat="server" CssClass="keyboardInput input_text" Width="130"
                                                            TextMode="Password" TabIndex="2"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td height="30" align="right" class="font_l">验证码：</td>
                                                    <td height="30" align="left">
                                                        <table border="0" cellpadding="0" cellspacing="0">
                                                            <tr>
                                                                <td height="30">
                                                                    <asp:TextBox ID="txt3" runat="server" TabIndex="3" Width="70" MaxLength="4" CssClass="input_text"></asp:TextBox>
                                                                </td>
                                                                <td>&nbsp;
                                                                    <img id="imgcode" src="CheckCode.aspx" onclick="this.src='CheckCode.aspx?'+Math.random();"
                                                                        alt="点击刷新验证码" /></td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td height="30" align="right" class="font_l">版&nbsp;&nbsp;本：</td>
                                                    <td height="30" align="left">
                                                        <asp:DropDownList ID="ddlLanguage" runat="server">
                                                        </asp:DropDownList>
                                                    </td>
                                                </tr>
                                            </table>
                                            <table width="300" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td>&nbsp;</td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                                <table width="592" border="0" cellspacing="0" cellpadding="0">
                                    <%--<tr>
                                        <td>
                                            <img src="Skin/Default/images/bottom.jpg" width="592" height="62" /></td>
                                    </tr>--%>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </form>
</body>
</html>

<script language="javascript">
function $() 
{ 
  var elements = new Array(); 
  for (var i = 0; i < arguments.length; i++) 
  { 
    var element = arguments[i]; 
    if (typeof element == 'string') 
      element = document.getElementById(element); 
    if (arguments.length == 1) 
      return element; 
    elements.push(element); 
  } 
  return elements; 
}
function checkForm(){
    var txt1 = $("txt1");
    if(txt1.value == ""){
        alert("请输入帐号!");
        txt1.select();
        return false;
    }
    
    var txt2 = $("txt2");
    if(txt2.value == ""){
        alert("请输入密码!");
        txt2.select();
        return false;
    }
    
    var txt3 = $("txt3");
    if(txt3.value == ""){
        alert("请输入验证码!");
        txt3.select();
        return false;
    }
    
    return true;
}
$("imgcode").src='CheckCode.aspx?' + Math.random();
</script>

